function base64_encrypt() {
    var str = $(".text").val();
    $(".text").val(btoa(str));
}

function base64_decrypt() {
    var str = $(".text").val();
    $(".text").val(atob(str));
}

async function copy_to_board() {
    try {
        await navigator.clipboard.writeText($(".text").val());
    } catch (e) {
        console.error('Failed to copy ', e);
    }
}